package com.cysion.study.ui

import android.view.View
import com.cysion.study.ktbox.base.BaseActivity
import com.cysion.study.ktbox.utils.whiteTextTheme
import com.cysion.other.color
import com.cysion.study.uibox.bar.TopBar
import com.cysion.study.R
import kotlinx.android.synthetic.main.activity_ti_preview.*

//预览练习题
class PreviewTiActivity : BaseActivity(), View.OnClickListener {


    override fun getLayoutId(): Int = R.layout.activity_ti_preview


    override fun initView() {
        whiteTextTheme(color(R.color.main_cl))
         topbar.apply {
            setTitle("预览练习题")
//            setTexts("添加", TopBar.Pos.RIGHT)
            setOnTopBarClickListener { obj, pos ->
                if (pos == TopBar.Pos.LEFT) {
                    finish()
                }else if (pos == TopBar.Pos.RIGHT) {
//                    startActivity_ex<AddKnowActivity>()//添加习题与知识

                    /*AlertSearch.search(self,""){ confirm: Int, start: String, end: String ->
                        CLog.i("@@@搜索="+start+end)
                        curPage=1
                        getDataList(curPage,start,end)
                    }*/
                }
            }
        }
        tv_look.setOnClickListener(this)
        tv_next.setOnClickListener(this)

    }
    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.tv_look->{//查看讲解

            }
            R.id.tv_next->{//下一题
//                var bundle = Bundle()
//                bundle.putString("pageType", "2")//pageType  1 单选，2多选，3解答，4判断
//                startActivity_ex<ChooseTiListActivity>(BUNDLE_KEY, bundle)
            }
        }
    }

    override fun closeMvp() {
    }

}
